﻿using System;

namespace ConsoleApplication
{
    class Fibonacci
    {
        static void Main(string[] args)
        {
            // 打印出斐波那契数列的前50项
            double[] feiBos = new double[50];
            feiBos[0] = 1;
            feiBos[1] = 1;
            for (int i = 2; i < 50; i++)
            {
                feiBos[i] = feiBos[i - 1] + feiBos[i - 2];
            }

            // String.Join(分隔符， 需要打印的数组)
            Console.WriteLine("feiBo = [" + string.Join(",", feiBos) + "]");
            Console.WriteLine("feiBo数组的长度是{0}", feiBos.Length);

            Console.ReadKey();
        }
    }
}